#ifndef __RTSP_H_
#define __RTSP_H_
#include <stdio.h>
#include <pthread.h>
#include "stdint.h"

typedef unsigned int SOCKET;
typedef pthread_t    ThreadHandle;
#define mSleep(ms)   usleep(ms*1000)

#define FILEBUFSIZE (1024 * 1024)

class IVidRtsp
{
private:
	/* data */
public:
	IVidRtsp(){};
	virtual ~IVidRtsp(){};
	virtual int32_t Start()=0;
	virtual int32_t Stop()=0;
	virtual int32_t Deliver(const uint8_t *data, int32_t size)=0;
};




class AWRtspStream : public IVidRtsp
{
public:
	AWRtspStream();
	virtual ~AWRtspStream();
public:
	virtual int32_t Start();
	virtual int32_t Stop();
    virtual int32_t Deliver(const uint8_t *data, int32_t size);
};



#ifdef __cplusplus
extern "C" {
#endif

typedef void *AW_VID_RTSP_HANDLE;


typedef struct aw_vid_rtsp_instance {
    IVidRtsp *IVidRTSP;
}vid_rtsp_ins;

int32_t aw_vid_rtsp_init( /*out*/AW_VID_RTSP_HANDLE *handle );
int32_t aw_vid_rtsp_deinit( /*in*/AW_VID_RTSP_HANDLE handle );

int32_t aw_vid_rtsp_start( /*in*/AW_VID_RTSP_HANDLE handle );
int32_t aw_vid_rtsp_stop( /*in*/AW_VID_RTSP_HANDLE handle );

int32_t aw_vid_rtsp_deliver( /*in*/AW_VID_RTSP_HANDLE handle, uint8_t *data, int32_t size );

#ifdef __cplusplus
}
#endif


#endif